﻿// -----------------------------------------------------------------------------
// 园丁,是个很简单的管理系统
//  gitee:https://gitee.com/hgflydream/Gardener 
//  issues:https://gitee.com/hgflydream/Gardener/issues 
// -----------------------------------------------------------------------------

namespace Gardener.Core.UserCenter.Services
{
    /// <summary>
    /// 租户服务
    /// </summary>
    public interface ITenantService : IServiceBase<SystemTenantDto, Guid>
    {
        /// <summary>
        /// 为租户绑定资源
        /// </summary>
        /// <param name="tenantId"></param>
        /// <param name="resourceIds"></param>
        /// <returns></returns>
        Task<bool> AddResources(Guid tenantId, Guid[] resourceIds);
        /// <summary>
        /// 获取租户下资源
        /// </summary>
        /// <param name="tenantId"></param>
        /// <returns></returns>
        Task<IEnumerable<ResourceDto>> GetResources(Guid tenantId);

        /// <summary>
        /// 复制一个新租户
        /// </summary>
        /// <remarks>
        /// 从现有租户，复制出一个新租户，租户的资源权限将保持一致。
        /// </remarks>
        /// <param name="tenantId"></param>
        /// <returns></returns>
        Task<bool> CopyNewTenant(Guid tenantId);
    }
}
